import apiRequest from "@/utils/request";

export async function queryPage(params = {}) {
    return apiRequest('GET', '/recipes/page', params);
}

export async function queryOne(id: number) {
    return apiRequest('GET', `/recipes/${id}`);
}

export async function add(params = {}) {
    return apiRequest('POST', '/recipes', params);
}

export async function edit(params = {}) {
    return apiRequest('PUT', '/recipes', params);
}

export async function remove(id: number) {
    return apiRequest('DELETE', `/recipes/${id}`);
}
